package com.jy.reader_info.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jy.reader_info.mapper.ReaderInfoMapper;
import com.jy.reader_info.domain.ReaderInfo;
import com.jy.reader_info.service.IReaderInfoService;

/**
 * 读者信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-30
 */
@Service
public class ReaderInfoServiceImpl implements IReaderInfoService 
{
    @Autowired
    private ReaderInfoMapper readerInfoMapper;

    /**
     * 查询读者信息
     * 
     * @param readerId 读者信息主键
     * @return 读者信息
     */
    @Override
    public ReaderInfo selectReaderInfoByReaderId(Long readerId)
    {
        return readerInfoMapper.selectReaderInfoByReaderId(readerId);
    }

    /**
     * 查询读者信息列表
     * 
     * @param readerInfo 读者信息
     * @return 读者信息
     */
    @Override
    public List<ReaderInfo> selectReaderInfoList(ReaderInfo readerInfo)
    {
        return readerInfoMapper.selectReaderInfoList(readerInfo);
    }

    /**
     * 新增读者信息
     * 
     * @param readerInfo 读者信息
     * @return 结果
     */
    @Override
    public int insertReaderInfo(ReaderInfo readerInfo)
    {
        return readerInfoMapper.insertReaderInfo(readerInfo);
    }

    /**
     * 修改读者信息
     * 
     * @param readerInfo 读者信息
     * @return 结果
     */
    @Override
    public int updateReaderInfo(ReaderInfo readerInfo)
    {
        return readerInfoMapper.updateReaderInfo(readerInfo);
    }

    /**
     * 批量删除读者信息
     * 
     * @param readerIds 需要删除的读者信息主键
     * @return 结果
     */
    @Override
    public int deleteReaderInfoByReaderIds(Long[] readerIds)
    {
        return readerInfoMapper.deleteReaderInfoByReaderIds(readerIds);
    }

    /**
     * 删除读者信息信息
     * 
     * @param readerId 读者信息主键
     * @return 结果
     */
    @Override
    public int deleteReaderInfoByReaderId(Long readerId)
    {
        return readerInfoMapper.deleteReaderInfoByReaderId(readerId);
    }
}
